/**
 * Created by DING on 2025/3/11.
 * */
#ifndef TASK1_DYHHW_2
#define TASK1_DYHHW_2

#include "TaskModule.h"
#include "../GlobalParameters.h"
#include <numeric>  // 用于计算平均值
extern "C" BaseObject *createTask1();
extern "C" void destroyTask1(BaseObject *p);

class Task1 : public TaskModule {
public:
Task1();

~Task1();

void onCompute(buffer_table_t *input, buffer_table_t *output) override;
private:
    int shm_fd;        // 共享内存文件描述符
    std::complex<float>* shared_memory; // 共享内存指针，存储复数数据
    void* shm_ptr;
};

#endif //TASK1_DYHHW_2
